// page/member/member.js
Page({
  data: {
    isHide: 0,
    thumb: '',
    nickname: ''
  },
  onLoad: function (options) {
    var that = this;
    var uid = wx.getStorageSync('uid');
    var app = getApp()
    wx.getUserInfo({
      success: function (res) {
        that.setData({
          isHide: 1,
          thumb: res.userInfo.avatarUrl,
          nickname: res.userInfo.nickName
        })
      }
    }),
      wx.request({
        url: app.globalData.host + '&g=App&m=User&a=index',
        data: { uid: uid },
        header: {
          'content-type': 'application/json'
        }
      })
  },
  onShow: function () {
    var app = getApp()
    var that = this;
    var uid = wx.getStorageSync('uid');
    // console.log(uid)
    wx.request({
      url: app.globalData.host + '&g=App&m=User&a=index',
      data: { uid: uid },
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        console.log(res.data)
        var ad = res.data.ad;
        that.setData({
          list: res.data.list,
        })
      }
    })
  },
  
})
